import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App1 from "../src/views/app"
import App from './pages/app.jsx'; // .jsx 和 js 后缀可以省略
import Appfather from './pages/appfather';
let stateArr = []
let count = 0

const root = ReactDOM.createRoot(document.getElementById('root'));
export let my_useState = (props)=>{
    let createIndex = count
    stateArr[createIndex] = stateArr[createIndex]? stateArr[createIndex]:props
    function setProps (newProps) {
        stateArr[createIndex] = newProps
        count = 0
        root.render(
            <Appfather />
        )
    }
    count++
    return [stateArr[createIndex],setProps]
}
root.render(
 
    <Appfather />
 
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals

